<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>通知管理</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

<div class="container mt-5">
    <h2>通知管理</h2>
    <form th:action="@{/admin/notification/publish}" method="post">
        <div class="mb-3">
            <label for="flightId" class="form-label">选择航班</label>
            <select id="flightId" name="flightId" class="form-control" required>
                <option value="">请选择航班</option>
                <option th:each="flight : ${flights}"
                        th:value="${flight.id}"
                        th:text="${'航班号: ' + flight.flightNo + ' - 出发地: ' + flight.depAirport + ' 到达地: ' + flight.arrAirport}">
                </option>
            </select>
        </div>
        <div class="mb-3">
            <label for="title" class="form-label">通知标题</label>
            <input type="text" class="form-control" id="title" name="title" required />
        </div>
        <div class="mb-3">
            <label for="content" class="form-label">通知内容</label>
            <textarea class="form-control" id="content" name="content" rows="4" required></textarea>
        </div>
        <button type="submit" class="btn btn-primary">发送通知</button>
    </form>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
